feat: Ollama live drift leg via CI-provisioned daemon - #326
Merged
Conversation
commit: |
Install+serve Ollama and pull qwen2:0.5b in the drift jobs; OLLAMA_MODEL param.
jpr5
marked this pull request as ready for review
July 23, 2026 00:06
jpr5
force-pushed
the
feat/ollama-live-drift
branch
from
July 23, 2026 00:06
c4a81c1 to
211ae8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Brings the Ollama drift surface into live CI coverage. Today
src/__tests__/drift/ollama.drift.tshas a live leg gated onOLLAMA_HOST, but no Ollama daemon exists in CI and there is no static fallback, so the leg is silently skipped — zero CI signal. Ollama needs no API key; the only "credential" is a running local daemon, so we can provision one in CI for free.Changes
test-drift.yml(scheduled/dispatchdriftjob) andfix-drift.yml(fixjob): added an additiveProvision Ollama daemonstep that installs Ollama, startsollama servein the background, waits for readiness, and pulls the tinyqwen2:0.5b(~350 MB, smallest model supporting both/api/chatand/api/generate). ExportedOLLAMA_HOST=127.0.0.1:11434+OLLAMA_MODEL=qwen2:0.5binto the collector/verify steps so the leg runs against the real daemon.fix-drift.yml's post-fix verify + authoritative re-collect steps are also un-gated so the auto-fix path can actually verify an Ollama fix (daemon is already running in that job).ollama.drift.ts: model is nowOLLAMA_MODEL ?? "llama3.2"(lets CI use the tiny model while a local dev run defaults unchanged);OLLAMA_HOSTis normalized to accept both a full base URL and Ollama's native barehost:portform. No assertion logic changed.The daemon install + model pull adds ~2-4 min to every drift run (daily scheduled
test-drift+ everyfix-driftinvocation). This is the tradeoff for real Ollama coverage. Weigh at merge — if too costly, options are caching the model or gating the leg to a less frequent cadence.Red-green proof (LIVE, real Ollama daemon)
Ran locally against a real
ollama serve+qwen2:0.5b(no key needed).GREEN (baseline, unmodified mock):
RED (temporarily dropped
done_reasonfrom the mock's non-streaming/api/chatbuilder — a genuine mock/real divergence):The
Surface: ollamamarker is emitted → the collector maps it to exit 2 (auto-fixable), confirming the leg has teeth against the real API.GREEN again (reverted): 3/3 pass; working tree clean (only the test + workflows changed).
Skip-safe: with no
OLLAMA_HOST(local dev / non-CI), the leg still cleanly skips (3 skipped) — no regression.Other checks
pnpm build✓, full unit suite ✓ (4684 passed).🤖 Generated with Claude Code
https://claude.ai/code/session_01KamK73Wu5heLxJEogM6hHC